﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="using:Coding4Fun.Toolkit.Controls"
                    xmlns:c4fConverters="using:Coding4Fun.Toolkit.Controls.Converters"
                    xmlns:system="using:System">

    <c4fConverters:StringToVisibilityConverter x:Key="StringVisibilityConverter" />
    <c4fConverters:BooleanToVisibilityConverter x:Key="BoolVisibilityConverter" />

    <Style TargetType="local:LockScreenPreview">

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:LockScreenPreview">
                    <Viewbox Stretch="Uniform">
                        <Grid>
                            <Grid Width="1344"
                                  Height="768">
                                <ContentPresenter Content="{TemplateBinding Content}"
                                                  ContentTemplate="{TemplateBinding ContentTemplate}" />
                                <local:SuperImage Source="{TemplateBinding LockScreenImageSource}"
                                                  Stretch="UniformToFill" />
                                <Rectangle Fill="Black"
                                           Opacity=".2" />
                            </Grid>
                            <Grid Margin="75, 0, 0, 0">
                                <Grid.RowDefinitions>
                                    <RowDefinition />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                    <RowDefinition Height="Auto" />
                                </Grid.RowDefinitions>
                                <StackPanel Margin="0, 0, 0, -5"
                                            Grid.Row="1"
                                            VerticalAlignment="Bottom"
                                            HorizontalAlignment="Left"
                                            Orientation="Horizontal">
                                    <TextBlock x:Name="TimeText"
                                               Text="18:49"
                                               Foreground="White"
                                               FontSize="145"
                                               FontWeight="Light"
                                               Margin="0, 0, 0, -15" />
                                    <StackPanel VerticalAlignment="Bottom"
                                                Margin="0,0,0,22">
                                        <TextBlock Text="{TemplateBinding TextLine1}"
                                                   FontSize="17.7"
                                                   Foreground="White"
                                                   Visibility="{Binding Text, RelativeSource={RelativeSource Mode=Self}, Converter={StaticResource StringVisibilityConverter}}"
                                                   FontFamily="Segoe UI Semilight" />
                                        <TextBlock Text="{TemplateBinding TextLine2}"
                                                   FontSize="17.7"
                                                   Foreground="White"
                                                   Visibility="{Binding Text, RelativeSource={RelativeSource Mode=Self}, Converter={StaticResource StringVisibilityConverter}}"
                                                   FontFamily="Segoe UI Semilight" />
                                        <TextBlock Text="{TemplateBinding TextLine3}"
                                                   FontSize="17.7"
                                                   Foreground="White"
                                                   Visibility="{Binding Text, RelativeSource={RelativeSource Mode=Self}, Converter={StaticResource StringVisibilityConverter}}"
                                                   FontFamily="Segoe UI Semilight" />
                                    </StackPanel>
                                </StackPanel>
                                <StackPanel Orientation="Horizontal"
                                            VerticalAlignment="Bottom"
                                            Margin="5, 0, 0, 20"
                                            Grid.Row="2">
                                    <TextBlock x:Name="DayText"
                                               Text="Wednesday"
                                               FontSize="53.333"
                                               Foreground="White"
                                               FontWeight="Light" />
                                    <TextBlock Text=","
                                               FontSize="53.333"
                                               Foreground="White"
                                               FontWeight="Light" />
                                    <TextBlock x:Name="DateText"
                                               FontSize="53.333"
                                               FontWeight="Light"
                                               Foreground="White"
                                               Margin="6,2,0,-4" />
                                </StackPanel>
                                <StackPanel Orientation="Horizontal"
                                            Grid.Row="3"
                                            Margin="20, 0, 0, 60">
                                    <Path Height="20"
                                          Stretch="Uniform"
                                          Fill="White"
                                          Data="F1 M 25.3333,23.7501L 28.4999,23.7501L 28.5,33.25L 25.3333,33.2501L 25.3333,23.7501 Z M 30.0833,25.3335L 33.2499,25.3335L 33.25,39.5834L 30.0833,39.5834L 28.5,41.1667L 28.5,50.6667L 25.3333,50.6667L 25.3333,41.1667L 23.75,39.5834L 20.5833,39.5835L 20.5832,25.3335L 23.7499,25.3335L 23.7499,34.8334L 24.5416,34.8334L 29.2916,34.8334L 30.0833,34.8334L 30.0833,25.3335 Z M 30.0833,47.5L 30.0833,44.3334L 50.6667,44.3334L 50.6667,30.0833L 34.8333,30.0834L 34.8333,26.9167L 55.4166,26.9167L 55.4166,47.5L 41.1666,47.5L 41.1667,50.6667L 45.125,50.6667L 45.9166,53.8333L 33.25,53.8333L 34.0417,50.6667L 38,50.6667L 38,47.5L 30.0833,47.5 Z " />
                                    <Path Width="20"
                                          Stretch="Uniform"
                                          Fill="White"
                                          Data="F1 M 59,34L 59,42L 56,42L 56,48L 20,48L 20,28L 56,28L 56,34L 59,34 Z M 24,32L 24,44L 52,44L 52,32L 24,32 Z M 25,43L 25,33L 30,33L 35,43L 25,43 Z M 31.5,33L 39.5,33L 44.5,43L 36.5,43L 31.5,33 Z M 51,33L 51,43L 46,43L 41,33L 51,33 Z "
                                          Margin="22,0,0,0">
                                        <Path.Projection>
                                            <PlaneProjection RotationZ="90" />
                                        </Path.Projection>
                                    </Path>

                                    <StackPanel Orientation="Horizontal"
                                                Margin="50,0,0,0"
                                                DataContext="{TemplateBinding ShowNotificationCount}"
                                                Visibility="{Binding Converter={StaticResource BoolVisibilityConverter}}">
                                        <Image Source="{TemplateBinding NotificationIconSource}"
                                               Height="20"
                                               Stretch="Uniform" />
                                        <TextBlock Text="4"
                                                   FontSize="12"
                                                   Margin="5, 15, 0, 0" />
                                    </StackPanel>
                                </StackPanel>
                            </Grid>
                        </Grid>
                    </Viewbox>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

</ResourceDictionary>
